|
|
|
| Table 12.2. continued | | Controls | Properties | Settings | | DataSource | dtaDestination | | DataField | StateCode | | Height | 300 | | Left | 1440 | | Top | 120 | | Width | 1200 | | Label | Name | Label2 | | BorderStyle | 1 Fixed Single | | DataSource | dtaDestination | | DataField | NameID | | Height | 300 | | Left | 1440 | | Top | 540 | | Width | 1200 |
|
|
|
|
|
|
Figure 12.7.
Laying out the
COMBO.VBP project. |
|
|
|
|
|
|
|
|
You need to add two lines of code to the project before it's complete. The following lines force Visual Basic 5 to update the form controls as soon as the user makes a selection in the combo box: |
|
|
|
|
|
|
|
|
Private Sub DBCombo1_Click(Area As Integer)
Label1 = DBCombo1.BoundText
End Sub
Private Sub DBCombo2_Click(Area As Integer)
Label2 = DBCombo2.BoundText
End Sub |
|
|
|
|
|
|
|
|
Save the form as COMBO.FRM and the project as COMBO.VBP. Now run the project and check your screen against the one in Figure 12.8. |
|
|
|
|
|